<template>
    <div class="list-container">
        <Table border :columns="columns" :data="data"></Table>
    </div>
</template>

<script>
    export default {
        name: "List",
        data() {
            return {
                columns: [
                    {
                        title: '规则编号',
                        key: 'id',
                        align: 'center'
                    },
                    {
                        title: '规则标题',
                        key: 'title',
                        align: 'center'
                    }, {
                        title: '创建时间',
                        key: 'createAt',
                        align: 'center'
                    }, {
                        title: '操作',
                        key: 'action',
                        width: 150,
                        align: 'center',
                        render: (h, params) => {
                            return h('div', [
                                h('Button', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        marginRight: '5px'
                                    },
                                    on: {
                                        click: () => {
                                            this.show(params.row.id)
                                        }
                                    }
                                }, '查看')])
                        }
                    }
                ],
                data: [{
                    id: '10010',
                    title: ' 山东-济南-人保费用配置',
                    createAt: '2018-08-28 19:08:26'
                }]
            }
        },
        methods: {
            show(id) {

            }
        }
    }
</script>

<style scoped>
    .list-container {
        padding: 20px 50px;
    }
</style>